package cn;

public class Odd {
	int plus(int a, int b) {
		int sum = 0;
		for (int i = a; i <= b; i++) {
			if (i % 2 == 0) {
				sum += i;
			}
		}
		return sum;
	}

	public static void main(String[] args) {
		Odd o = new Odd();
		System.out.println("请输出俩个数之间所有偶数之和sum=" + o.plus(1, 10));
	}

}
